home *** CD-ROM | disk | FTP | other *** search
-
- ~4Dgifts/toolbox/src/demos/OpenGL README
-
-
- THIS CODE RUNS/COMPILES ON 5.1 Irix OR LATER
- THIS CODE WILL NOT RUN ON LESS THAN 5.1 Irix
-
- `!' indicates new or updated as of version 4.1
-
-
-
- this demos subtree contains OpenGL (some new/some old) demo source
- for atlantis, backtrace, drip, fadeflip, ideas, insect, lorenz,
- puzzle, space, stonehenge and tex_cube.
- ! ^^^^^
-
- Two of the new demos use the OpenGL Motif Widget, libGLw.a (src
- is in toolbox/src/exampleCode/opengl/siggraphCD/lib/libGLw):
-
- backtrace
- stonehenge
-
- Six use libtk, a library supplying simple windowing, event
- handling, and more using only Xlib (src is in libtk, a symlink
- to ../../exampleCode/opengl/siggraphCD/lib/libtk):
-
- atlantis
- backtrace
- insect
- lorenz
- puzzle
- stonehenge
-
- Three (as well as all of the above) use only the GL and GLU
- OpenGL libraries:
-
- drip
- fadeflip
- ideas
-
- ! space simply uses the GL library.
-
-
-
- atlantis: sharks, whales, and dolphins living side-by-side in harmony
- To Run:
- % atlantis [-dr] [-ir] [-f file.rgb]
- -dr run in direct render mode (rendering goes
- directly to the hardware)
- -ir run in indirect render mode (rendering goes
- through the X server)
- -f file.rgb by specifying a .rgb file, atlantis will use
- the image to simulate the water reflection
- off the fishes
- mouse buttons pressed while mouse held stationary:
- LEFTMOUSE - translate "to the left and up"
- MIDDLEMOUSE - rotate "to the right and down"
- RIGHTMOUSE - translate away from the eyepoint
- r/R KEY - reset view as when window first came up
- ESC - exit program
- Demonstrates:
- Lighting, animation capabilities, texture-mapping.
-
-
-
- backtrace: demo of faked ray tracing
- To Run:
- % backtrace
- RIGHTMOUSE - rotates around the z axis
- MIDDLEMOUSE - changes radius
- LEFTMOUSE - changes phi (azimuth)
- ESC - exit program
- To select a light, click (any MOUSEBUTTON) on it.
- For a non-interactive demo, select "Rotate Automatically"
- under the "Motion" menu.
- Comments:
- Should run pretty quickly on most systems as long as the
- texture mapping is turned off.
-
-
-
- drip: Makes little droplets of color.
- To Run:
- % drip [-r[number]] [-f] [-w]
- every new MOUSEBUTTON press makes another expanding drop
- LEFTMOUSE - make expanding red drops
- MIDDLEMOUSE - make expanding green drops
- RIGHTMOUSE - make expanding blue drops
- ESC - exit program
- -r - makes random drops for a non-interactive demo.
- Without the -r option, pressing LEFT/MIDDLE/RIGHT
- -MOUSE buttons makes drops of color.
- -f - run in fullscreen mode
- -w - set the background to WHITE
- Demonstrates:
- 2D graphics
- Blending functions.
- Comments:
- Not too involved or flashy, but should run quickly.
-
-
-
- fadeflip: Flips a texture-mapped square around
- To Run:
- % fadeflip [file1.rgb] [file2.rgb] [file3.rgb] [...]
- RIGHTMOUSE - spin the object,
- release while dragging to give momentum.
- Without filenames, uses defaults. Files must be square.
- If it complains it can't find the files, you may have
- to give it full pathnames.
- Demonstrates:
- Texture mapping.
- Comments:
- Another small and mildly amusing demo
-
-
-
- ideas: Ideas in Motion ported to OpenGL
- To Run:
- % ideas -a
- LEFTMOUSE - restarts program animation sequence
- SPACEBAR - pause/unpause toggle
- -a run program continuously
- Comments:
- Should look good on almost any platform.
- Demonstrates:
- Stippling, lighting, animation capabilities.
-
-
-
- insect: straight-ahead OpenGL port of thant-gaud's inspiration.
-
-
-
- lorenz: ride on/near particles stuck in a Lorenz attractor
- To Run:
- % lorenz [-h] [-i] [-x] [-s speed] [-w rot_v] [-g gravity]
- -h Print this message.
- -i Print information about the demo.
- -x Enclose the particles in a box made of hexagons.
- -s speed Sets the number of new line segments per redraw
- interval per line. Default value: 3.
- -w rot_v Spins the hexagons on their centers, and the sides
- of the box on their centers. Hexagons spin at the
- rate rot_v degrees per redraw, and box sides spin
- at -rot_v/2 degrees per redraw.
- -g gravity Sets the strength of the attraction of the eye to
- the red particle. Actually, it's not gravity since
- the attraction is proportionate to distance.
- Default value: 0.002. Try large values!
- Executions control:
- <spacebar> step through single frames
- g begin continuous frames
- s stop continuous frames
- Comments:
- shows particles stuck in a Lorenz attractor (parameters used
- are r=28, b=8/3, sigma=10). The eye is attracted to the red
- particle, with a force directly proportional to distance. A
- command line argument puts the particles inside a box made
- of hexagons, helping to maintain the sense of 3 dimensions,
- but it can slow things down. Other options allow you to play
- with the redraw rate and gravity.
-
-
-
- puzzle: move pieces in the proper order to solve the puzzle
- To Run:
- % puzzle
- r Reset puzzle
- s Solve puzzle (may take a few seconds to compute)
- d Destroy a piece - makes the puzzle easier
- b Toggles the depth buffer on and off
- RIGHTMOUSE spins the puzzle
- LEFTMOUSE moves pieces
- ESC exit program
-
-
-
- ! space: a simulation of the Solar System and the Milky Way galaxy.
- when approaching vicinity of planets or moons actual
- texture-map surfaces or polygons of the spheres are able to
- be made visible.
-
-
-
- stonehenge: demo of stonehenge with shadows, textures, etc
- To Run:
- % stonehenge
- on Reality Engines, turn on texture mapping under "SPFX" menu
- Try Turning on "Scale = 1:500" under the "Time" menu - if
- it's too jerky turn it off again.
- May want to set weather.
- The telescope option under the "SPFX" menu gives a little
- telescope which can be moved around using the mouse.
- For a non-interactive demo, select "Demo Mode" under the
- "Misc" menu.
- Mouse interface:
- Make sure Demo Mode is turned off.
- LEFTMOUSE - turn
- MIDDLEMOUSE - horizontal motion changed speed:
- left to right = forward
- right to left = backward
- RIGHTMOUSE - stop motion
- Comments:
- May have a couple of bugs.
-
-
-
- tex_cube: small texture-mapping demo of a translucent sphere.
- To Run:
- % tex_cube [name_of_square_rgb_file]
- Uses a default image if no filename is specified
- Drag with mouse to rotate
-
-